{% extends "base.html" %}
{% block content %}

{% if completed %}
    <div class="alert alert-secondary"><h4>Good news! :-)</h4>The analysis is completed, you can view it <a href="{% url "report" task_id %}">here</a>.</div>
{% else %}
    <script type="text/JavaScript">setTimeout("location.reload(true);",30000);</script>
    <div class="alert alert-secondary">
        <h4>Hang on...</h4>
        <p>The analysis is not finished yet, it's still <b>{{status}}</b>. This page will refresh every 30 seconds.</p>
        {% if session_data %}
            <p>To view the Remote Session - click <a href='javascript:window.open(window.location.origin + "/guac/{{task_id}}/{{session_data}}", "_blank");'>here.</a></p>
            <div class="progress progress-striped active" style="margin-top: 10px;">
                <div class="progress-bar progress-bar-striped progress-bar-animated" style="width:100%"></div>
            </div>
        {% endif %}
    </div>
{% endif %}
{% endblock %}
